<?php
// +----------------------------------------------------------------------
// | ThinkCMF [ WE CAN DO IT MORE SIMPLE ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013-2017 http://www.thinkcmf.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: 小夏 < 449134904@qq.com>
// +----------------------------------------------------------------------
namespace app\portal\validate;

use think\Validate;

class MessageValidate extends Validate
{
    protected $rule = [
        'name' => 'require|max:8|chs',
        'address' => 'require',
        'moblie' => 'number|max:11|min:11',
        'content' => 'require|chsAlphaNum',
    ];
    protected $message = [
        'name.require' => '姓名不能为空！',
        'name.max' => '姓名不能超过8位！',
        'name.chs' => '姓名必须为汉字！',
        'address.require' => '地址不能为空！',
        'moblie.number' => '电话必须为数字！',
        'moblie.max' => '电话格式不正确！',
        'moblie.min' => '电话格式不正确！',
        'content.require' => '内容不能为空！',
        'content.chsAlphaNum' => '内容非法！',
    ];

}